Skip to main content

Event handling

LetsGetChecked uses webhook endpoints to identify changes on resources. Sending a webhook means that the LetsGetChecked server will send a POST request to the client endpoint URL, when there is a change to a client resource.

Event types

The webhook payload includes a Type, which identifies when a notification is raised for one of the following reasons:

  • Order: An updated order
  • Result: An updated result
  • Outreach: An updated outreach notification

Please, notice that you can receive the same status for different webhook types. For example, you can receive the ResultsAvailable status for the order type and then the same status for the result. This means these two resources, order and results, have their own status and should be interpreted separately.

Handle duplicate events

Webhook endpoints may occasionally receive the same event more than once. We advise you to guard against duplicated events by making your event processing idempotent.

Order of events

It is possible for events not to be delivered in the order that they are generated. For example, when LetsGetChecked dispatches a test kit, the following events will occur for each order:

  • KitDispatched event
  • KitRegistered event

It is possible for these events not to be delivered in this order and LetsGetChecked recommends that your endpoint handles this accordingly. You can also use the API to validate the status or fetch any missing object.

Event delivery retries

LetsGetChecked has a retry mechanism in place for failed webhook notifications, for example a message is considered for the retry mechanism if the client server retrieves HTTP status codes in the:

  • 5XX range Http Status Code
  • 401 Unauthorized
  • 403 Forbidden

Below is described the amount and timeframe of retries.

  • When a notification fails, the webhook mechanism retries 3 times immediately.
  • After this, the webhook mechanism waits 15 minutes and tries 3 times immediately again. This loop happens 4 consequent times, so 1 hour window of retries.

When the number of retries is exhausted, the webhooks mechanism fails. If notifications fail to deliver after the described attempts, contact the LetsGetChecked team.

LetsGetChecked acknowledges notifications that return a response with an HTTP 200 status code. For more information, see Error codes.